# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgssglue
pkgver=0.7
pkgrel=0
pkgdesc="exports a gssapi interface which calls other random gssapi libraries"
url="https://gitlab.com/gsasl/libgssglue"
arch="all"
license="BSD-3-Clause"
# heimdal-{dev,libs} is needed for gssapi_mech.conf
depends="heimdal-dev heimdal-libs"
subpackages="$pkgname-dev"
source="https://gitlab.com/gsasl/libgssglue/uploads/7ae681900cb3bc052fe14c2965883f30/libgssglue-$pkgver.tar.gz
	gssapi_mech.conf"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir/" install

	install -Dm644 "$srcdir"/gssapi_mech.conf \
		"$pkgdir/"etc/gssapi_mech.conf
}

sha512sums="
a642315802d89dfaf29f1db4998c66a9b22aa861683d3b73ee5009f6eb44744b757a0550282cce98d76fe66e726b730a3440536836fee9d04574e693c263a6de  libgssglue-0.7.tar.gz
e97d7256ab05cd33178988d28139f0ba80797ac828dff3f7b0ab4cf6c04d016de1f731b8fe114f18319c6a07780a9701cd84a4e9fd5db6480c8d1df129f2402e  gssapi_mech.conf
"
